package com.lujieni.mybatis.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import java.util.Date;

@Data
public class BasicEntity {
    @Id
    @Column(name = "id")
    private Integer id;

    // 不加@JSONField json中就是时间戳
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    private String createUserCode;

    private String modifyUserCode;

    @Column(name = "is_active")
    private Integer active;

}
